Typically, characteristics of an image captured by an image-capturing device (e.g. digital camera) depend on a number of factors. The factors include physical content of captured scene i.e. on reflectance properties, intensity, and color of a light source (capture illuminant) and spectral sampling properties of the image-capturing device. In a number of applications, such as object recognition, to digital photography, it is important that the colors recorded by the image-capturing device are constant across an illumination by different type of capture illuminants. An object captured by a camera may appear different in color when it is illuminated with different light sources (or capture illuminants). The object appears different because the color of light reflected from the object changes with the color of the light source.
A Light source (capture illuminant) is generally characterized by its color temperature, which is defined as a variation of color of a black body radiator with temperature. When a white object is illuminated with low color temperature light source, reflection from the object becomes reddish. On the other hand, a high temperature light source causes the same white object appear bluish.
Human visual system (HVS) has the ability to map white colors to a perception of white, even though an object has different surface reflections when it is illuminated with different light sources. However, image-capturing devices, like digital still cameras (DSCs), need to be taught how to map white color under a captured illuminant to white color under a viewing illuminant (illuminant used while viewing an image). The problem of making a white object appear as white under different types of illuminants (capture illuminant, viewing illuminant) is called white balancing. The capability to perform white balancing automatically without any user intervention is referred to as automatic or auto white balancing (AWB).
Existing systems and methods solve this problem by adjusting gains of the three primary colors (red (R), green (G), and blue (B)) of the sensor in the image capturing device. For example, one of the existing auto white balancing method involves controlling a balance of RGB components (red, green and blue) of each pixel in an image in such a manner that the average of the entire image results in an achromatic (gray) color. However, such a method results in color failure if the given image is dominated by one or two colors.
Another white balancing method to overcome color failure includes splitting the image into RGB blocks; finding an average value of each RGB block, and extracting only the blocks the average value of which lies in a predetermined range. Gain control of RGB components is performed so that the RGB average values of the extracted blocks result in an achromatic color. Such methods are effective insofar as the light sources (capture illuminants) were restricted to a certain range of color temperatures and fail to provide good white balance control when the light sources with extreme color temperature (either side from day light) are used for illumination.
In addition, all gray worlds based methods use static thresholds to extract blocks/pixels from an image. Hence, using a fixed threshold will affect robust extraction of blocks/pixels that represent color of the light source. Such gray world based methods may pick colored pixels that do not represent the true color of a light source resulting in calculating gain (of the primary colors) might lead to color failure.
Hence, there is a well-felt need to provide a system and method to perform automatic white balancing that gives images of very high objective and subjective quality while having a computationally simple processing method for easy implementation.